import React from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';
import s from './ChartTitle.module.css';

export default function ChartTitle({ className, children }) {
	return (
		<div className={cn(className, s.chartTitle)}>
			<span className={s.icon} />
			{children}
		</div>
	);
}

ChartTitle.propTypes = {
	className: PropTypes.string,
	children: PropTypes.node.isRequired,
};

ChartTitle.defaultProps = {
	className: s.ChartTitle,
};
